//页面加载完毕后触发
$(function(){
	//返回顶部
	$("#bak_top").click(()=> {
        $("html,body").animate({scrollTop: '0px'}, 800);
    });
	window.onscroll = function () {
	    document.documentElement.scrollTop + document.body.scrollTop > 100 ? document.getElementById("bak_top").style.display = "block" :
	        document.getElementById("bak_top").style.display = "none";
	};
    
	function d() {
	    document.title = document[b] ? "人呢？快回来" : a
	}
	
	var b, c, a = document.title;
	"undefined" != typeof document.hidden ? (b = "hidden", c = "visibilitychange") : "undefined" != typeof document.mozHidden ? (b = "mozHidden", c = "mozvisibilitychange") : "undefined" != typeof document.webkitHidden && (b = "webkitHidden", c = "webkitvisibilitychange"), ("undefined" != typeof document.addEventListener || "undefined" != typeof document[b]) && document.addEventListener(c, d, !1)
	tooltip();
	function tooltip() {
	    $("body *").each(function (b) {
	        if (this.title) {
	            var c = this.title;
	            var a = 30;
	            $(this).mouseover(function (d) {
	                this.title = "";
	                $("body").append('<div id="tooltip">' + c + "</div>");
	                $("#tooltip").css({
	                    left: (d.pageX + a) + "px",
	                    top: d.pageY + "px",
	                    opacity: "0.8"
	                }).show(250)
	            }).mouseout(function () {
	                this.title = c;
	                $("#tooltip").remove()
	            }).mousemove(function (d) {
	                $("#tooltip").css({
	                    left: (d.pageX + a) + "px",
	                    top: d.pageY + "px"
	                })
	            })
	        }
	    })
	}
});